package com.ccsoft.backuptools.config;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.util.UrlPathHelper;

//@Configuration
public class ResolvePath {

//    @Bean
    public TomcatServletWebServerFactory webServerFactory() {
        System.out.println("tomcat工厂配置成功啦。。。");
        TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
        factory.addConnectorCustomizers(connector -> {
            connector.setProperty("relaxedQueryChars", "\"<>[\\]^`{|}");
            connector.setProperty("relaxedPathChars", "\"<>[\\]^`{|}");
        });
        return factory;
    }
}
